package com.rran.study.designpattern.behavioral.template.service;

/**
 * @author yy
 * @Type SimpleTemplete.java
 * @Desc
 * @date 2020/7/21 15:03
 */
public abstract class AbstractShoppingTemplete implements Shopping {

    @Override
    public void buyGoods() {
        login();
        browse();
        buy();
        pay();
        expressDelivery();
    }

    protected void login() {
        System.out.println("手机号码登录");
    }

    protected void expressDelivery() {
        System.out.println("拿快递");
    }

    protected abstract void browse();

    protected abstract void buy();

    protected abstract void pay();
}
